# Backend-service

A small service to process the data that comes from the bot

# Technology

| python 3.12 |
|-------------|
| FastAPI     |
| Uvicorn     |
| SQLAlchemy  |
| PostgreSQL  |

# Running the service locally

1. Create a virtual environment: `python -m venv venv`

2. Establish the necessary dependencies:

    * prod: `pip install -e .`

    * dev: `pip install -e .[dev]`

3. Set the necessary environment variables:

```
export DB_URI=postgresql+asyncpg://postgres:password@localhost:5432/users
```

Complete file with environment
variables: [.env.example](https://github.com/WolfTechSTD/recruit_bot/blob/main/backend/.env.example)

4. Start migrations: `alembic upgrade head`

5. Start the service: `uvicorn recrut.app:main --reload`

# Running tests

1. Install Docker and docker-compose: [docker](https://docs.docker.com/engine/install/)

2. Run tests : `docker compose -f docker-compose.dev.yml up --build`

# License

[MIT](https://github.com/WolfTechSTD/recruit_bot/blob/main/LICENSE)
